Import('RTT_ROOT')
Import('rtconfig')

from building import *

cwd = GetCurrentDir()

# add the general drivers.

src = Split("""
""")

if GetDepend(['BSP_USING_UART']):
    src += ['drv_usart.c']

if GetDepend(['BSP_USING_USBH']):
    src += ['drv_usbh.c']

if GetDepend(['BSP_USING_SPI']):
    src += ['drv_spi.c']

if GetDepend(['BSP_USING_DCMI']):
    src += ['drv_dcmi.c']

path =  [cwd]

group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
group += SConscript(os.path.join('../common/', 'SConscript'))

Return('group')
